package com.zhou.po;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;
import java.util.List;

@Data
public class CommunityChat implements Serializable {
    private static final long serialVersionUID = -5033063600325668125L;
    @JsonProperty( "msg_id")
    private String msgId;
    private String city;
    private String from;
    private String to;
    private Long timestamp;
    @JsonProperty( "chat_type")
    private String chatType;
    private Payload payload;


    @Data
    public static class Payload{
        private List<Body> bodies;
        private Ext ext;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Body{
        private String msg;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Ext{
        private String province;
        private String city;
        /**
         * 小区名称
         */
        private String name;
        /**
         * 消息发送人用户类型 1-业主 2-业主家属 3-租客 31-租客家属33-管家
         */
        private String fromUserType;
        /**
         * 消息接收人用户类型，取值与fromUserType一样
         */
        private String toUserType;
        /**
         * 小区id
         */
        private String courtUuid;

        /**
         * 发件人姓名
         */
        private String fromName;

        /**
         * 收件人姓名
         */
        private String toName;
    }


}
